



var b={
    a:{
        name:{
            c:111
        }
    }
}


observe(b)




function observe(obj) {
    var keys = Object.keys(obj);

    for (var i = 0; i < keys.length; i++) {
        defineReactive(obj, keys[i]);
    }
}


function defineReactive(  
    obj,
    key,
    val,
) {
    
    val = obj[key];
    observe(val);
    Object.defineProperty(obj, key, {
        enumerable: true,
        configurable: true,
        get() {
            console.log('属性被读取--->',key,);
            return val
        }
    });
}